import com.atshiyou.bean.Student;
import com.atshiyou.dao.StudentDao2;
import com.atshiyou.util.SqlSessionUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class TestIn {
    public static void main(String[] args) {
        SqlSession session = SqlSessionUtil.getSession();
        StudentDao2 studentDao2 = session.getMapper(StudentDao2.class);
        List list = new ArrayList<>();
        list.add(1);
        list.add(2);
        list.add(8);
//        int[] array={1,3,5};
        Map map = new HashMap<>();
        map.put("ids",list);
        List<Student> studentList = studentDao2.findc(map);
        for (Student s:studentList){
            System.out.println(s);
        }
        SqlSessionUtil.closeSession();
    }
}
